<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../js/vue.js"></script>
</head>
<body>
    <div id="app">
        <div v-test="imgs">hello vue</div>
    </div>
    <script>
        Vue.directive("test",{
            bind(el,binding,vnde){
                console.log("ok1")
            },
            inserted(el,binding,vnode){
                console.log("ok2")
            },
            update(el,binding,vnode) {
                console.log("ok3")
            }

        })
        new Vue({
            el:"#app",
            data:{
                imgs:[]
            },
            mounted(){
                setTimeout(()=>{
                    this.imgs = ['./img/1.jpg', './img/2.jpg', './img/3.jpg']
                },2000)
            }
                
            })
    
    
    </script>
    
</body>
</html>